
<!DOCTYPE html>
<html lang="en">
<head>
	<!-- meta -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<!--	<meta name="description" content="Hellohao图床是一个基于JAVA-SpringBoot开发的,免费纯粹的图片存放驿站">-->
<!--	<meta name="author" content="tc.hellohao.cn">-->
<!--	<meta name="keywords" content="图床,图片上传,hellohao图床,开源图床,hellohao">-->
	<!-- title -->
	<title>Hellohao</title>

<!--	<title th:text="Hellohao图床"></title>-->
	<link rel="shortcut icon" href="https://hellohao.nos-eastchina1.126.net/BlogImg/favicon.ico" type="image/x-icon"/>
	<link rel="icon" type="image/ico" href="https://hellohao.nos-eastchina1.126.net/BlogImg/favicon.ico">
	<!-- CSS IMPORT -->
	<link rel="stylesheet" href="static/css/style.css" type="text/css" />
	<link href="static/webuploade/css/webuploader.css" media="all" rel="stylesheet" type="text/css"/>
	<link href="static/webuploade/css/style.css" media="all" rel="stylesheet" type="text/css"/>
	<script src="static/static/js/jquery-3.4.1.min.js" type="text/javascript"></script>
	<link href="static/static/css/bootstrap.min.css" rel="stylesheet">
	<link href="static/static/css/toastr.min.css" media="all" rel="stylesheet" type="text/css"/>
	<link href="static/static/css/login-register.css" media="all" rel="stylesheet" type="text/css"/>
	<link href="static/static/css/sweetalert.min.css" media="all" rel="stylesheet" type="text/css"/>
	<link href="static/webuploade/css/component.css" media="all" rel="stylesheet" type="text/css"/>
	<!--	<link th:href="@{/static/css/popover.css}" media="all" rel="stylesheet" type="text/css"/>-->
	<link rel="stylesheet" href="static/layui/layui/css/layui.css">
	<link rel="stylesheet" href="static/css/intro.css">
	<link rel="stylesheet" href="static/css/verify.css">

	<script src="static/static/js/toastr.min.js" type="text/javascript"></script>
	<script src="static/static/js/login-register.js"></script>
	<script src="static/static/js/clipboard.min.js"></script>
	<script src="static/static/js/bootbox.min.js"></script>
	<!--	<script th:src="@{/static/js/sweetalert.min.js}"></script>-->
	<!--	<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>-->
	<script src="static/static/js/sweetalert2.min.js"></script>
	<!--	<script th:src="@{/static/js/popover.min.js}"></script>-->
	<script src="static/layui/layui/layui.js"></script>
	<style type="text/css">
		a{transition: all 0.6s;}
		a:hover{
			text-decoration: none;
			transform: scale(1.4);}
		#goupdate{
			width:120px;
			height:50px;
			margin-right: 6%;
			font-size:1.5em;
			line-height:50px;
			text-align:center;
			float: right;
			color:#FFF;
			border:2px solid;
			border-radius:5px;
			-moz-border-radius:5px;
			cursor:pointer;
		}
		#goupdate2{
			width:120px;
			height:50px;
			margin-right: 6%;
			font-size:1.5em;
			line-height:50px;
			text-align:center;
			float: right;
			color:#FFF;
			border:2px solid;
			border-radius:5px;
			-moz-border-radius:5px;
			cursor:pointer;
		}
		#goupdate:hover{}
		#beian a{
			color: #fff;
		}
		#setday{
			cursor: pointer;
			color: #4ebc86;
			font-weight: 600;
			font-family: 黑体;
			text-shadow: 5px 2px 6px #000;
		}
	</style>
</head>
<body class="simple">
<div class="text-center w-mian" id="videohtml">
</div>
<!-- preloader -->
<div class="preloader-container">
	<div class="content-container">
		<!-- preloader -->
		<span class="spinner-section-far"></span>
		<!-- end preloader -->
		<h6 class="preloader-text">
			LOADING</h6>
	</div>
</div>
<!-- end preloader -->
<!-- logo -->
<img class="img-logo menu-link" data-section="home" data-nav-title="home" alt="logo" src="static/img/logo_white.png" />
<!-- end logo -->
<!-- menu -->
<div class="open">
	<div class="cls">
	</div>
	<div>
		<ul class="sub-menu-t" id="usersrc">
			<li class="active"><a class="menu-link" data-section="home" data-nav-title="home"
								  data-section-pos="0" data-section-posy="0">首页 <i class="fa fa-fw fa-home"></i>
			</a></li>
			<li><a href="javascript:;" class="md-trigger" data-modal="modal-3">登录&nbsp;<span class="glyphicon glyphicon-user" aria-hidden="true"></span></a></li>
			<li><a href="javascript:;" class="md-trigger" data-modal="modal-4">注册&nbsp;<span class="glyphicon glyphicon-education" aria-hidden="true"></span></a></li>
<!--			<li><a class="menu-link" href="https://github.com/Hello-hao/Tbed" target="_blank"-->
<!--			>GitHub<i class="fa fa-github"></i></a></li>-->
<!--			<li><a class="menu-link" href="http://www.hellohao.cn" target="_blank"-->
<!--			>作者<i class="fa fa-github"></i></a></li>-->

<!--							<li><a href="javascript:;" class="md-trigger" data-modal="modal-2">赞助商&nbsp;<i class="fa fa-share-alt"></i></a></li>-->

<!--											<li><a class="menu-link" onclick="tanchuang('亲爱的开发者','全新的响应式图床站，如果你也喜欢，希望给我一个Star。\n Hellohao开发者交流群：864800972','success');"-->
<!--							>关于<i class="fa fa-share-alt"></i></a></li>-->
		</ul>
	</div>
	<div class="cls">
	</div>
</div>
<!-- end menu  -->
<!-- page container -->
<div class="page-container">
	<!-- section container -->
	<div class="section-container">
		<!-- home section -->
		<section id="diyi" class="home-section">
			<!-- section background -->
			<div class="bg-container"></div>
			<!-- end section background -->
			<!-- content -->
			<div class="content col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-12 col-xs-rlt no-pad centering-y">
				<div class="col-md-12 col-sm-12">
					<!-- headline -->
					<h1 style="font-size: 4.5em;">Hellohao</h1>
					<a id="goupdate" class="menu-link" data-section="contact" data-nav-title="contact" data-section-pos="-100"
					   data-section-posy="0"><span class="glyphicon glyphicon-open" aria-hidden="true"></span>立即上传</a>
<!--					<a id="goupdate2"  onclick="xiazai()">-->
<!--						<span class="glyphicon glyphicon-th-large" aria-hidden="true"></span>客户端</a>-->

					<div class="sub-title" id="wordsrotator">
						<h4>纯粹免费的图片驿站</h4>
					</div>

					<!-- end headline -->
					<!-- short description -->
					<p class="desc">网站由JAVA语言编写应用SpringBoot框架开发，前端全部组件由BootStrap/Layui框架编写。由作者个人更新维护，后期会加入更全面的功能供大家使用，如有BUG请与我反馈。</p>
					<!-- end short description -->
					<!-- countdown container -->
					<div id="countdown" class="countdown-container">
						<!-- days left -->
						<div class="dash days_dash" style="max-width: 172px;">
							<div class="counter">
								<div class="dash_title">days</div>
								<div id="ri" style="margin-top: 26%;font-size: 2.5em;color: #FFFFFF;font-weight: bold;">0</div>
							</div>
						</div>
						<!-- end days left -->
						<!-- hours left -->
						<div class="dash hours_dash" style="max-width: 172px;">
							<div class="counter">
								<div class="dash_title">hours</div>
								<div id="shi" style="margin-top: 26%;font-size: 2.5em;color: #FFFFFF;font-weight: bold;">0</div>
							</div>
						</div>
						<!-- end hours left -->
						<!-- minutes left -->
						<div class="dash minutes_dash" style="max-width: 172px;">
							<div class="counter">
								<div class="dash_title">mins</div>
								<div id="fen" style="margin-top: 26%;font-size: 2.5em;color: #FFFFFF;font-weight: bold;">0</div>
							</div>
						</div>
						<!-- minutes left -->
						<div class="dash seconds_dash" style="max-width: 172px;">
							<div class="counter">
								<div class="dash_title">secs</div>
								<div id="miao" style="margin-top: 26%;font-size: 2.5em;color: #FFFFFF;font-weight: bold;">0</div>
							</div>
						</div>
						<!-- end minutes left -->
					</div>
					<!-- end countdown container -->
				</div>

				<div id="beian" style="text-align: center;">
					<br />
					<span><a href="http://hellohao.cn/" rel="nofollow" target="_blank">Hellohao©技术支持</a></span>
					<br />
					<br />
					<br />
				</div>

			</div>
			<!-- end content -->
		</section>
		<!-- end home section -->
		<div class="tlinks">Collect from <a href="/" >网站建设</a></div>
		<!-- contact section -->
		<section id="dier" class="contact-section" >
			<ul style="  position: absolute;right: 63px;top: 24px;z-index: 9999;">
				<li class="active">
					<a class="menu-link" data-section="home" data-nav-title="home"data-section-pos="0" data-section-posy="0">
						<i class="fa fa-fw fa-home" style="font-size: 40px;color: #FFF;"></i>
					</a>
				</li>
			</ul>
			<!-- section background -->
			<div class="bg-container-static"></div>
			<!-- end section background -->
			<!-- content -->
			<div class="content col-md-10 col-md-offset-1 col-sm-12 col-xs-12 no-pad centering-y col-sm-rlt" >
				<div class="col-md-12 col-sm-12">

					<form enctype="multipart/form-data">
						<!--        <div class="form-group">-->
						<!--图片上传模板-->
						<div id="wrapper">
							<div id="container">
								<!--头部，相册选择和格式选择-->
								<div id="uploader">
									<div class="queueList">
										<div id="dndArea" class="placeholder">
											<br />
											<span class="text">您也可以尝试文件拖拽，使用QQ截屏工具，然后激活窗口后粘贴。<span id="whts" data-toggle="popover" title="Example popover" class="glyphicon glyphicon-question-sign" aria-hidden="true"></span></span>
											<br />
											<span class="text" id="urlsc" ><a style="color: #4ebd87;font-size: 0.9em;cursor:pointer;font-weight: bold;" onclick="imgsc()">使用图片URL地址上传</a></span>

											<div id="filePicker">

											</div>
										</div>
									</div>
									<div class="statusBar" style="display:none;">
										<div class="progress">
											<span class="text">0%</span>
											<span class="percentage"></span>
										</div><div class="info"></div>
										<div class="btns">
											<div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<!--        </div>-->
					</form>
					<form class="contact-form" action="contact.php" method="post" enctype="multipart/form-data">

						<!-- full width -->
						<div class="col-xs-12 text-center no-pad">
							<div class="input-container no-mrg" id="urlstext">
								<textarea id="urls" name="message"  style="padding:20px;font-weight: 600; border: 1px solid #838383;border-radius: 5px;"></textarea>
								<div class="input-border-bottom"></div>
							</div>

							<!-- notification container -->
							<div class="col-xs-12 notif-container no-pad">
								<div class="form-notif"></div>
							</div>
							<!-- end button container -->
						</div>
						<!-- end full width -->
					</form>
					<!-- button container -->
					<div class="col-xs-12 no-pad text-left mrg-top-xs">
						<div style="margin: 0 auto;text-align:center">
							<button type="button" onclick="urltype(1);" class="button button-green button-small">URL</button>
							<button type="button" onclick="urltype(2);"  class="button button-green button-small">Markdown</button>
							<button type="button" onclick="urltype(3);"  class="button button-green button-small">HTML</button>
						</div>
					</div>
				</div>
				<!-- contact form container -->
			</div>
			<!-- end content -->
		</section>

	</div>
	<!-- end section container -->
</div>



<div class="md-modal md-effect-3" id="modal-4">
	<div class="md-content"  >
		<h3>账号注册</h3>
		<div>
			<p style="color: #ea1c27;" id="zcts"></p>
			<div class="form loginBox">
				<form method="post" data-remote="true" accept-charset="UTF-8">
					<div style="font-size: 13px;">
                                        <span> > 用户名注册后不能修改<br/>
                                         > 邮箱激活链接如果没有请在【垃圾箱】查找</span>
					</div>
					<hr/>
					<input id="registerusername" style="border-left:none;border-right:none;border-top:none;border-bottom:none;"  type="text"
						   placeholder="用户名(数字/字母不得超过10位)"
						   name="username">
					<input id="registeremail" style=" border-left:none;border-right:none;border-top:none;border-bottom:none;"  type="text" placeholder="邮箱"
						   name="email">
					<input id="registerpassword" style="color:#000;background-color:#fff;padding: 18px 25px 22px 25px;; border-left:none;border-right:none;border-top:none;border-bottom: none;"  type="text" placeholder="密码"
						   name="password">
					<input id="registerpassword_confirmation" style="color:#000;background-color:#fff;padding: 18px 25px 22px 25px; border-left:none;border-right:none;border-top:none;border-bottom: none;"  type="text"
						   placeholder="重复密码" name="password_confirmation">
					<div class="form-group">
						<br />
						<div id="mpanel2" ></div>
						<hr />
					</div>
				</form>
			</div>
			<div style="width: 100%;height: 30px;">
				<br />
				<button class=" btn-sm btn-primary" style="float: right;" onclick="ismail();">注册</button>
			</div>
		</div>
	</div>
</div>

<!--	注册-->
<div class="md-modal md-effect-3" id="modal-3">
	<div class="md-content">
		<h3>账号登录</h3>
		<div>
			<p id="dlts" style="color: #f35518; text-align: center;"></p>
			<div class="form loginBox">
				<form id="login" onkeydown="keyLogin();">
					<div class="form-group">
						<input id="loginemail" type="email" style=" border-left:none;border-right:none;border-top:none;border-bottom:1px solid #0F2543;"  placeholder="Email">
					</div>
					<div class="form-group">
						<input id="loginpassword" type="password" style="color:#000;background-color:#fff;padding: 18px 25px 22px 25px;width: 100%; border-left:none;border-right:none;border-top:none;border-bottom:1px solid #0F2543;"   placeholder="Password">
						<hr />
					</div>
					<div class="form-group">
						<div id="mpanel1" ></div>
						<hr />
					</div>
				</form>
			</div>
			<div style="width: 100%;height: 30px;">
				<!--					<button id="loginto" type="button" class="btn-sm  btn-info" onclick="loginAjax()" style="float: right; cursor:pointer;" title="登录"><span class="glyphicon glyphicon-log-in" aria-hidden="true"></span>&nbsp;登录</button>-->
				<button class=" btn-sm btn-primary" data-loading-text="Loading..." id="dl" style="float: right;" onclick="loginAjax()">登录</button>
			</div>
		</div>
	</div>
</div>


<!--	赞助商-->
<div class="md-modal md-effect-3" id="modal-2">
	<div class="md-content">
		<h3>服务赞助商</h3>
		<div>
			<p></p>
			<div class="form loginBox">
				<a href="https://www.maoyuncloud.com/" target="_blank">
					<img style="max-width: 33.3%;" src="" />
					<!--						https://hellohao-cloud.oss-cn-beijing.aliyuncs.com/%E5%AF%B9%E8%B1%A1%E5%AD%98%E5%82%A8%E8%B5%9E%E5%8A%A9logo/WechatIMG172L.png-->
				</a>
				<a href="https://www.upyun.com" target="_blank">
					<img style="max-width: 33.3%;" src="" />
					<!--						https://hellohao-cloud.oss-cn-beijing.aliyuncs.com/%E5%AF%B9%E8%B1%A1%E5%AD%98%E5%82%A8%E8%B5%9E%E5%8A%A9logo/%E5%8F%88%E6%8B%8D%E4%BA%91_logo2.png-->
				</a>
			</div>
		</div>
	</div>
</div>
<div class="md-overlay"></div>

<!--	http://cdn.wwery.com/tourist/4c7810718014927.png
-->

<script src="static/webuploade/js/webuploader.js"></script>
<script src="static/webuploade/js/upload.js" ></script>
<script type="text/javascript" src="static/js/jquery.js"></script>
<script src="static/js/html5shiv.js"></script>
<script src="static/js/respond.min.js"></script>
<script src="static/webuploade/js/classie.js"></script>
<script src="static/webuploade/js/modalEffects.js"></script>
<!-- bootstrap -->
<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="static/js/plugins.min.js"></script>
<script type="text/javascript" src="static/js/main_constellation.js"></script>
<script src="static/js/verify.js"></script>

<script>
	var isday = 0;
	var verification = false;
	var zcverification = false;
	var logotmp = 0;
	var zctmp = 0;
	var arr_url = "";
	var arr_markdown = "";
	var arr_html = "";
	var urltypes = 1;//1 url 2 md 3 a标签
	var ykxz = 1;
	var filesize = 1048576;
	var imgcount = 1;
	var suffix= "gif,jpg,jpeg,bmp,png";

	$(document).ready(function () {
		$(".jb").fadeToggle();
		//$("#page-header").fadeToggle("slow");
		$(".jb").fadeToggle(4000);
	});

	if (window != top){top.location.href = location.href;}

	$(function () {
		var backtype = 1;
		var sc = null;

		if(sc!=1 && sc!=null){
			alert(sc);
		}
		var gg="\u4E5F\u8BB8...|\u8FD9\u5C06\u662F\u6700\u597D\u7528\u7684\u56FE\u5E8A";
		var arr=new Array();
		var arr2=new Array();
//可以用字符或字符串分割
		arr=gg.split('|');
		for(var i=0;i<arr.length;i++)
		{arr2.push('<h2>'+arr[i]+'</h2>');}
		$.wordrotator_words =arr2;

		setInterval(clock,1000);//首页动态时间
		if(backtype==1){
			$(".bg-container-static").css('background', 'url('+"https:\/\/ss0.bdstatic.com\/94oJfD_bAAcT8t7mm9GUKT-xh_\/timg?image\u0026quality=100\u0026size=b4000_4000\u0026sec=1565769264\u0026di=74d809d6cfae81bbab83bf9d573d8f9a\u0026src=http:\/\/pic17.nipic.com\/20110917\/7420038_160826355111_2.jpg"+') no-repeat');
			$(".bg-container-static").css({'background-position':'50% 50%','height':'100%','width':'100%','overflow':'hidden','background-size':'cover'});

		}
		//设置页面资料
		var webname = "Hellohao";
		var explain = "\u7F51\u7AD9\u7531JAVA\u8BED\u8A00\u7F16\u5199\u5E94\u7528SpringBoot\u6846\u67B6\u5F00\u53D1\uFF0C\u524D\u7AEF\u5168\u90E8\u7EC4\u4EF6\u7531BootStrap\/Layui\u6846\u67B6\u7F16\u5199\u3002\u7531\u4F5C\u8005\u4E2A\u4EBA\u66F4\u65B0\u7EF4\u62A4\uFF0C\u540E\u671F\u4F1A\u52A0\u5165\u66F4\u5168\u9762\u7684\u529F\u80FD\u4F9B\u5927\u5BB6\u4F7F\u7528\uFF0C\u5982\u6709BUG\u8BF7\u4E0E\u6211\u53CD\u9988\u3002";
		var backtype = 1;
		var links = "<a href=\"http:\/\/hellohao.cn\/\" rel=\"nofollow\" target=\"_blank\">Hellohao\u00A9\u6280\u672F\u652F\u6301<\/a>";
		var video = "https:\/\/hellohao-cloud.oss-cn-beijing.aliyuncs.com\/Pexels.mp4";
		$("#webname").text(webname);
		$("#explain").text(explain);
		$("#links").html(links);


		$("#whts").attr("title",'图片大小不得超过'+1+' MB，登录本站可上传'+10+' M图片以及查看历史图片记录等更多操作。');
		$.ajax({
			type: "POST",
			url: "/islogin",
			dataType: "json",
			success: function (data) {
				if(data.lgoinret==1){
					var h = '<li class="active"><a class="menu-link" data-section="home" data-nav-title="home"\n' +
							'                    data-section-pos="0" data-section-posy="0">Home <i class="fa fa-fw fa-home"></i>\n' +
							'                </a></li>';
					var h1 = '<li><a class="menu-link" target="_blank" href="/admin/goadmin" id="usernames">控制面板&nbsp;<i class="fa fa-fw fa-list"></i></a></li>';
					var h2 = '<li><a class="menu-link" href="javascript:exit();" title="666" onclick="">退出&nbsp;<span class="glyphicon glyphicon-log-out"></span></a></li>';
					$("#usersrc").html(h + h1 + h2);
				}
			}
		});

		toastr.options.positionClass = 'toast-bottom-right';
		toastr.options = {
			closeButton: true,//是否显示关闭按钮
			debug: false,
			progressBar: true,
			positionClass: "toast-bottom-right",
			onclick: null,
			showDuration: "300",
			hideDuration: "1000",
			timeOut: "2000",
			extendedTimeOut: "1000",
			showEasing: "swing",
			hideEasing: "linear",
			showMethod: "fadeIn",
			hideMethod: "fadeOut"
		};
		//toastr.info("欢迎使用Hellohao图床！");
	});


	function zhuce(mail, registerusername, registerpassword) {
		if(zcverification){
			//验证成功
			$.ajax({
				type: "POST",
				url: "/user/register",
				data: {email: mail, username: registerusername, password: registerpassword,zctmp:zctmp},
				dataType: "json",
				success: function (data) {
					if (data.ret > 0) {
						if (data.zctype == 1) {
							layui.use('layer', function(){
								var layer = layui.layer;
								layer.alert('注册成功，请前往邮箱激活你的账号，注意！激活邮件如果迟迟未收到，有可能在您的【垃圾箱】中。', {
									skin: 'layui-layer-molv' //样式类名 自定义样式
									,closeBtn: 0  // 是否显示关闭按钮
									,anim: 1 //动画类型
									,btn: ['确定'] //按钮
									,icon: 1  // icon
									,yes:function(){
										window.location.reload();
									}
								});
							});
						} else {
							layui.use('layer', function(){
								var layer = layui.layer;
								layer.alert('注册成功，快去登录体验吧。', {
									skin: 'layui-layer-molv' //样式类名 自定义样式
									,closeBtn: 0  // 是否显示关闭按钮
									,anim: 1 //动画类型
									,btn: ['确定'] //按钮
									,icon: 1  // icon
									,yes:function(){
										window.location.reload();
									}
								});
							});
						}
					} else {
						if (data.ret == -2) {
							layui.use('layer', function(){
								var layer = layui.layer;
								layer.alert('注册失败，用户名或邮箱重复且用户名只能为字母数字，请重试。', {
									skin: 'layui-layer-molv' //样式类名 自定义样式
									,closeBtn: 0  // 是否显示关闭按钮
									,anim: 1 //动画类型
									,btn: ['确定'] //按钮
									,icon: 2  // icon
								});
							});
						} else if(data.ret == -3){
							layui.use('layer', function(){
								var layer = layui.layer;
								layer.alert('本站关闭了注册功能。', {
									skin: 'layui-layer-molv' //样式类名 自定义样式
									,closeBtn: 0  // 是否显示关闭按钮
									,anim: 1 //动画类型
									,btn: ['确定'] //按钮
									,icon: 2  // icon
								});
							});
						}else if(data.ret == -4){
							layui.use('layer', function(){
								var layer = layui.layer;
								layer.alert('非法注册，请刷新页面后重新尝试。', {
									skin: 'layui-layer-molv' //样式类名 自定义样式
									,closeBtn: 0  // 是否显示关闭按钮
									,anim: 1 //动画类型
									,btn: ['确定'] //按钮
									,icon: 2  // icon
								});
							});
						}else {
							layui.use('layer', function(){
								var layer = layui.layer;
								layer.alert('注册失败，请重试。', {
									skin: 'layui-layer-molv' //样式类名 自定义样式
									,closeBtn: 0  // 是否显示关闭按钮
									,anim: 1 //动画类型
									,btn: ['确定'] //按钮
									,icon: 2  // icon
								});
							});
						}
						setTimeout(function () {
						}, 2000);
					}
					again(2);
				}
			});
		}else{

		}

	}

	//登录
	function loginAjax() {
		var loginemail = $("#loginemail").val();
		var loginpassword = $("#loginpassword").val();
		if(verification){
			//验证成功
			$.ajax({
				type: "POST",
				url: "/user/login",
				data: {email: loginemail, password: loginpassword,logotmp:logotmp},
				dataType: "json",
				success: function (data) {
					$('#loginModal').modal('hide');
					if (data == 1) {
						toastr.success("登录成功。");
						setTimeout(function () {
							window.location.reload();
						}, 1000);
					} else {
						dd();
						if (data == -1) {
							$('#dlts').text('您的账号是未激活状态，无法登陆。');
							toastr.error('您的账号是未激活状态，无法登陆。');
							again();
						} else if(data==-2){
							$('#dlts').text('您的账号已被冻结。');
							toastr.error('您的账号已被冻结。');
							again(1);
						}else if(data==-3){
							$('#dlts').text('非法登录，请刷新页面重新尝试。');
							toastr.error('非法登录，请刷新页面重新尝试。');
							again(1);
						}
						else {
							$('#dlts').text('登录失败，你的邮箱或密码不正确，请重试。');
							toastr.error('登录失败，你的邮箱或者密码不正确，请重试。');
							again(1);
						}
						setTimeout(function () {
							//window.location.reload();
						}, 2000);
					}
				}
			});
		}else{
			$('#dlts').text('请滑动验证码进行验证，才可登录。');
		}
	}

	function exit() {
		$.ajax({
			type: "POST",
			url: "/user/exit.do",
			dataType: "json",
			success: function (data) {
				toastr.success("账号已退出。");
				window.location.reload();
			}
		});
	}

	function imgsc() {
		var str = '输入图片URL地址：';
		if(isday>0){
			str = '输入图片URL地址：('+isday+'天后将会自动销毁)';
		}
		swal(str, {
			content: "input",
			//buttons: true
		})
				.then((value) => {
			var result =value;
		if(result!=null && result!="" ){
			urlimg(result);
		}
	});
	}

	function copy(val) {
		var data = null;
		if (val == 1) {
			data = $('#urls').text();
		} else if (val == 2) {
			data = $('#markdowns').text();
		} else if (val == 3) {
			data = $('#htmls').text();
		} else {
			return;
		}
		var copy = new ClipboardJS('.btn', {
			text: function (trigger) {
				return data;
			}
		});
		copy.on('success', function (e) {
			toastr.success("复制成功");
			copy.off("success");
		});
		copy.on('error', function (e) {
			toastr.error("复制失败");
			copy.off("error");
		});
	}
	function loadScriptString(code) {
		var script = document.createElement("script");
		script.type = "text/javascript";
		try {
			// firefox、safari、chrome和Opera
			script.appendChild(document.createTextNode(code));
		} catch (ex) {
			// IE早期的浏览器 ,需要使用script的text属性来指定javascript代码。
			script.text = code;
		}
		document.getElementsByTagName("head")[0].appendChild(script);
	}
	var baidu = "var _hmt = _hmt || [];\n(function() {\n  var hm = document.createElement(\"script\");\n  hm.src = \"https:\/\/hm.baidu.com\/hm.js?67e5cffdfb4739cb5d02b1d169555f14\";\n  var s = document.getElementsByTagName(\"script\")[0]; \n  s.parentNode.insertBefore(hm, s);\n})();\n";
	loadScriptString(baidu);

	function urlimg(result) {
		if(result) {
			var rx=/^https?:\/\//i;
			if(rx.test(result)==true){
				$('#loadingModal').modal({backdrop: 'static', keyboard: false});
				$.ajax({
					type: "POST",
					url: "/upload",
					dataType: "json",
					data: {imgurl: result,setday:isday},
					success: function (data) {
						for(var i=0;i<data.length;i++){

							if(data[i]==-1){
								$('#loadingModal').modal('hide');
								//tanchuang('上传失败','未配置存储源，请先后台配置存储源','error');
								swal('上传失败', '未配置存储源，请先后台配置存储源');

							}
							else if(data[i]==-2){
								$('#loadingModal').modal('hide');
								swal('上传失败', '图片不存在或太大');
							}
							else if(data[i]==-3){
								$('#loadingModal').modal('hide');
								swal('上传失败', '文件类型不符合要求');
							}
							else if(data[i]==-4){
								$('#loadingModal').modal('hide');
								swal('上传失败', '该文件不支持上传');
							}else if(data[i]==-5){
								$('#loadingModal').modal('hide');
								swal('上传失败，可用空间不足');
							}
							else{
								$('#loadingModal').modal('hide');
								swal('上传成功', '该图片链接已成功上传');
								$("#address").css('display', 'block');
								arr_url += data[i] + '\r\n';
								arr_markdown += '![ ](' + data[i] + ')\r\n';
								arr_html += '<img src="' + data[i] + '" alt="Image" title="Image" /> \r\n';
							}
							if(urltypes==1){
								$("#urls").text(arr_url);
							}else if(urltypes==2){
								$("#urls").text(arr_markdown);
							}else{
								$("#urls").text(arr_html);
							}
						}
					}
				});
			}else{tanchuang('网址格式错误','网址必须以http(s)://开头。','error');}
		}
	}

	function tanchuang(str1,str2,types) {
		swal({
			title: str1,
			text: str2,
			type: types,
			showCancelButton: false,//true显示两个按钮
			confirmButtonColor: "#A5DC86",
			confirmButtonText: "知道了",
			closeOnConfirm: true,
			closeOnCancel: false
		});
	}

	function urltype(urltypes){
		if(urltypes==1){
			$("#urls").text(arr_url);
		}else if(urltypes==2){
			$("#urls").text(arr_markdown);
		}else{
			$("#urls").text(arr_html);
		}
	}
	//获取当前时间
	function clock(){
		now = new Date();
		year = now.getFullYear();
		month = now.getMonth() + 1;
		day = now.getDate();

		today = ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'];
		week = today[now.getDay()];

		hour = now.getHours();
		min = now.getMinutes();
		sec = now.getSeconds();
		if (hour < 10) {
			hour = "0" + hour;
		}
		if (min < 10) {
			min = "0" + min;
		}
		if (sec < 10) {
			sec = "0" + sec;
		}
		if (day < 10) {
			day = "0" + day;
		}
		//$("#nian").html(year);
		//$("#yue").html(month);
		$("#ri").html(day);
		$("#shi").html(hour);
		$("#fen").html(min);
		$("#miao").html(sec);
	}
	function xiazai(){
		swal({
			title: "即将下载客户端",
			text: "客户端目前支持支Windows系统，Mac后期可能会推出。",
			icon: "success",
			buttons: true,
			buttons: ["取消", "下载"],
			dangerMode: false,
		})
				.then((value) => {
			if (value) {
				window.open("http://img.wwery.com/HellohaoApps/PC/Hellohao%E5%9B%BE%E5%BA%8A_beta.exe");
			} else {
			}
		});

	}
	//回车登录
	function keyLogin(){
		if (event.keyCode==13)  //回车键的键值为13
			document.getElementById("dl").click(); //调用登录按钮的登录事件
		//document.getElementById()
	}

	//页面模板效果
	(function ($) {
		var backtype = 1;
		var videourl = "https:\/\/hellohao-cloud.oss-cn-beijing.aliyuncs.com\/Pexels.mp4";
		"use strict";
		$.bg_type = 3;
		$.launch_date = [7, 9, 2016]; 										//-- launch date [d,m,yyyy], for example 7 September 2016 : [7,9,2016]
		if(backtype==1){
			$.bg_urls = [
				"https:\/\/ss0.bdstatic.com\/94oJfD_bAAcT8t7mm9GUKT-xh_\/timg?image\u0026quality=100\u0026size=b4000_4000\u0026sec=1565769264\u0026di=74d809d6cfae81bbab83bf9d573d8f9a\u0026src=http:\/\/pic17.nipic.com\/20110917\/7420038_160826355111_2.jpg"
			];
		}else{
			$('#videohtml').html('\t<video muted autoplay="autoplay" loop="loop"  class="bgvid" id="bgvid" style="width: 100%;height: 100%;display: block;object-fit: fill;"><source src="'+videourl+'" type="video/mp4"></video>');
		}
		$.youtube_url = ""; 												//-- just the last words after https://www.youtube.com/watch?v=
		$.self_host_video_path = ""; 									//-- self hosted video path
		$.self_host_video_filename = ""; 								//-- self hosted video filename "WITHOUT .MP4 EXTENSION"
		$.latitude_longitude = [ [21.1991367, 72.84016666] ];
		$.map_marker_url = "img/marker.png"; 							//-- Map marker image url
		$.map_marker_info = '<h6 class="text-darkgrey">Main Office</h6><p class="map-marker-info">Open at 09:00 - 15:00<br>Monday till Saturday</p>';
		$.enable_wordrotator = true; 									//-- enabling wordrotator on headline text
		$.wordrotator_words = ['<h2>也许...</h2>', '<h2>这将是你用过最好用的图床站</h2>']; //-- Array of words, for headline text
		$.is_changing_section = false;

		var sett = "2";
		if(sett!=1){
			$('#diyi').removeClass('home-section');
			$('#diyi').html('');
			$('#dier').addClass('home-section');
			$('#dier').removeClass('contact-section');
			$('#dier').css("background","rgba(38,38,38,0.7)");//style="background: rgba(38,38,38,0.7);"
		}
	})(jQuery);


	$('#mpanel1').slideVerify({
		type : 1,		//类型
		vOffset : 5,	//误差量，根据需求自行调整
		barSize : {
			width : '100%',
			height : '40px',
		},
		ready : function() {
		},
		success : function() {
			verification = true;
			var myDate = new Date(); 
			var tmp = Number(myDate.getMinutes()+''+myDate.getSeconds());
			logotmp = (tmp-500+1+2+3-4);
			$.ajax({
				type: "POST",
				url: "/user/verification",
				data:{tmp:logotmp,type:1},
				dataType: "json",
				success: function (data) {}
			});
			},
			error : function() {}
	});
	$('#mpanel2').slideVerify({
		type : 1,		//类型
		vOffset : 5,	//误差量，根据需求自行调整
		barSize : {
			width : '100%',
			height : '40px',
		},
		ready : function() {
		},
		success : function() {
			zcverification = true;
			var myDate = new Date();
			var tmp = Number(myDate.getMinutes()+''+myDate.getSeconds());
			zctmp = (tmp-500+1+2+3-4);
			$.ajax({
				type: "POST",
				url: "/user/verification",
				data:{tmp:zctmp,type:2},
				dataType: "json",
				success: function (data) {}
			});
		},
		error : function() {}
	});
	function again(v) {
		if(v==1){
			logotmp=0;
			verification = false;
			$('#mpanel1').html('');
			$('#mpanel1').slideVerify({
				type : 1,		//类型
				vOffset : 5,	//误差量，根据需求自行调整
				barSize : {
					width : '100%',
					height : '40px',
				},
				ready : function() {
				},
				success : function() {
					verification = true;
					var myDate = new Date();
					var tmp = Number(myDate.getMinutes()+''+myDate.getSeconds());
					logotmp = (tmp-500+1+2+3-4);
					$.ajax({
						type: "POST",
						url: "/user/verification",
						data:{tmp:logotmp,type:1},
						dataType: "json",
						success: function (data) {}
					});
				},
				error : function() {}
			});
		}
		if(v==2){
			zctmp=0;
			zcverification = false;
			$('#mpanel2').html('');
			$('#mpanel2').slideVerify({
				type : 1,		//类型
				vOffset : 5,	//误差量，根据需求自行调整
				barSize : {
					width : '100%',
					height : '40px',
				},
				ready : function() {
				},
				success : function() {
					verification = true;
					var myDate = new Date();
					var tmp = Number(myDate.getMinutes()+''+myDate.getSeconds());
					zctmp = (tmp-500+1+2+3-4);
					$.ajax({
						type: "POST",
						url: "/user/verification",
						data:{tmp:zctmp,type:2},
						dataType: "json",
						success: function (data) {}
					});
				},
				error : function() {}
			});
		}

	}
function setday() {
	swal("输入图片期限（天）,到期自动销毁图片,最高365天：\n(输入0为永久保存)", {
		content: "input",
	})
		.then((value) => {
		var result =value;
	var reg=/^[0-9]\d*$/;
	if(result!=null && result!="" ){
		if(reg.test(result)){
			if(result<=365){
				isday = result;
// 初始化以后添加
				uploader.options.formData.setday = isday;
			}else{
				swal('输入天数有误，最大不可超过365天');
			}
		}else{
			swal('输入格式不正确，只可输入0-9之间正整数');
		}
	}
	if(isday>0){
		$('#setday').text(isday+'天后销毁');
	}else{
		$('#setday').text('图片期限');
	}

});
}
</script>

</body>
</html>
